package com.bugbuff.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bugbuff.common.pojo.SoulReport;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SoulReportMapper extends BaseMapper<SoulReport> {
    /**
     * 查询鉴定结果相似的用户:需要排除用户自己
     * @param conclusionId
     * @param userId
     * @return
     */
    @Select("select distinct uid from tb_soul_report where conclusion=#{conclusionId} and uid!=#{userId}")
    List<SoulReport> querySimilarUsers(Integer conclusionId, Long userId);
}
